Optimal. Leaf size=22 \[ \frac {\tanh ^{-1}(\sin (x))}{2 a^2}+\frac {\sec (x) \tan (x)}{2 a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3254, 3853,
3855} \begin {gather*} \frac {\tanh ^{-1}(\sin (x))}{2 a^2}+\frac {\tan (x) \sec (x)}{2 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3254
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \frac {\cos (x)}{\left (a-a \sin ^2(x)\right )^2} \, dx &=\frac {\int \sec ^3(x) \, dx}{a^2}\\ &=\frac {\sec (x) \tan (x)}{2 a^2}+\frac {\int \sec (x) \, dx}{2 a^2}\\ &=\frac {\tanh ^{-1}(\sin (x))}{2 a^2}+\frac {\sec (x) \tan (x)}{2 a^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(45\) vs. \(2(22)=44\).
time = 0.01, size = 45, normalized size = 2.05 \begin {gather*} \frac {-\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+\log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )+\sec (x) \tan (x)}{2 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 36, normalized size = 1.64
method | result | size |
derivativedivides | \(\frac {-\frac {1}{4 \left (1+\sin \left (x \right )\right )}+\frac {\ln \left (1+\sin \left (x \right )\right )}{4}-\frac {1}{4 \left (\sin \left (x \right )-1\right )}-\frac {\ln \left (\sin \left (x \right )-1\right )}{4}}{a^{2}}\) | \(36\) |
default | \(\frac {-\frac {1}{4 \left (1+\sin \left (x \right )\right )}+\frac {\ln \left (1+\sin \left (x \right )\right )}{4}-\frac {1}{4 \left (\sin \left (x \right )-1\right )}-\frac {\ln \left (\sin \left (x \right )-1\right )}{4}}{a^{2}}\) | \(36\) |
risch | \(-\frac {i \left ({\mathrm e}^{3 i x}-{\mathrm e}^{i x}\right )}{\left ({\mathrm e}^{2 i x}+1\right )^{2} a^{2}}-\frac {\ln \left ({\mathrm e}^{i x}-i\right )}{2 a^{2}}+\frac {\ln \left ({\mathrm e}^{i x}+i\right )}{2 a^{2}}\) | \(58\) |
norman | \(\frac {\frac {\tan ^{5}\left (\frac {x}{2}\right )}{a}+\frac {\tan ^{7}\left (\frac {x}{2}\right )}{a}-\frac {\tan \left (\frac {x}{2}\right )}{a}-\frac {\tan ^{3}\left (\frac {x}{2}\right )}{a}}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right ) a \left (\tan ^{2}\left (\frac {x}{2}\right )-1\right )^{3}}-\frac {\ln \left (\tan \left (\frac {x}{2}\right )-1\right )}{2 a^{2}}+\frac {\ln \left (\tan \left (\frac {x}{2}\right )+1\right )}{2 a^{2}}\) | \(91\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 41 vs.
\(2 (18) = 36\).
time = 0.29, size = 41, normalized size = 1.86 \begin {gather*} -\frac {\sin \left (x\right )}{2 \, {\left (a^{2} \sin \left (x\right )^{2} - a^{2}\right )}} + \frac {\log \left (\sin \left (x\right ) + 1\right )}{4 \, a^{2}} - \frac {\log \left (\sin \left (x\right ) - 1\right )}{4 \, a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 37 vs.
\(2 (18) = 36\).
time = 0.39, size = 37, normalized size = 1.68 \begin {gather*} \frac {\cos \left (x\right )^{2} \log \left (\sin \left (x\right ) + 1\right ) - \cos \left (x\right )^{2} \log \left (-\sin \left (x\right ) + 1\right ) + 2 \, \sin \left (x\right )}{4 \, a^{2} \cos \left (x\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 117 vs.
\(2 (20) = 40\).
time = 0.24, size = 117, normalized size = 5.32 \begin {gather*} - \frac {\log {\left (\sin {\left (x \right )} - 1 \right )} \sin ^{2}{\left (x \right )}}{4 a^{2} \sin ^{2}{\left (x \right )} - 4 a^{2}} + \frac {\log {\left (\sin {\left (x \right )} - 1 \right )}}{4 a^{2} \sin ^{2}{\left (x \right )} - 4 a^{2}} + \frac {\log {\left (\sin {\left (x \right )} + 1 \right )} \sin ^{2}{\left (x \right )}}{4 a^{2} \sin ^{2}{\left (x \right )} - 4 a^{2}} - \frac {\log {\left (\sin {\left (x \right )} + 1 \right )}}{4 a^{2} \sin ^{2}{\left (x \right )} - 4 a^{2}} - \frac {2 \sin {\left (x \right )}}{4 a^{2} \sin ^{2}{\left (x \right )} - 4 a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 38 vs.
\(2 (18) = 36\).
time = 0.45, size = 38, normalized size = 1.73 \begin {gather*} \frac {\log \left (\sin \left (x\right ) + 1\right )}{4 \, a^{2}} - \frac {\log \left (-\sin \left (x\right ) + 1\right )}{4 \, a^{2}} - \frac {\sin \left (x\right )}{2 \, {\left (\sin \left (x\right )^{2} - 1\right )} a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 30, normalized size = 1.36 \begin {gather*} \frac {\mathrm {atanh}\left (\sin \left (x\right )\right )}{2\,a^2}-\frac {\sin \left (x\right )}{2\,\left (a^2\,{\sin \left (x\right )}^2-a^2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________